<?php
namespace app\shop\controller\setting;

use app\common\enum\settings\GetPhoneTypeEnum;
use app\shop\controller\Controller;
use app\shop\model\settings\Message as MessageModel;
use app\shop\model\settings\MessageField as MessageFieldModel;
use app\shop\model\settings\MessageSettings as MessageSettingsModel;
use app\shop\model\settings\Setting as SettingModel;
use think\facade\Db;

/**
 * 消息控制器
 */
class Feedback extends Controller
{
    public function index()
    {
        $list = Db::name("system_feedback")->alias("sf")
            ->field("sf.*,u.nickName")
            ->join("jjjshop_user u","sf.user_id=u.user_id")
            ->paginate(15);

        return $this->renderSuccess('', compact('list'));
    }

    public function delete()
    {
        $id = $this->request->param('id');
        Db::name("system_feedback")->where(array('id'=>$id))->delete();
        return $this->renderSuccess('删除成功');
    }
}